package com.woniuxy.intellihome.service.impl;

import com.woniuxy.intellihome.entity.Region;
import com.woniuxy.intellihome.mapper.RegionMapper;
import com.woniuxy.intellihome.service.RegionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author jobob
 * @since 2021-08-11
 */
@Service
public class RegionServiceImpl extends ServiceImpl<RegionMapper, Region> implements RegionService {
    @Autowired
    private RegionMapper regionMapper;

    @Override
    public List<Region> getByPid(Region region) {
        return regionMapper.getByPid(region);
    }

    @Override
    public String getNameById(Integer id) {
        return regionMapper.getNameById(id);
    }
}
